package cn.edu.ctbu.scoremg.controller;


import cn.edu.ctbu.scoremg.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/student")
public class StudentController {

    @Autowired
    private StudentService studentService;

    @GetMapping("/list")
    public String getList() {
        //    List<Student> students = studentService.getAll();
        //    model.addAttribute("students", students);
        return "/student/list";
    }
    @GetMapping("/list0")
    public String getList0() {
        //    List<Student> students = studentService.getAll();
        //    model.addAttribute("students", students);
        return "/student/list0";
        //此时是当学生登录时
    }
}

    // 在StudentController中
//    @GetMapping("/index")
//    public String studentIndex() {
//        return "/student/index";
//    }



